package cn.growthgate.fgo.entity;

import java.io.Serializable;
import java.math.BigDecimal;

import javax.validation.constraints.NotNull;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.FieldStrategy;
import com.baomidou.mybatisplus.enums.IdType;

/**
 * <p>
 * 职介相性
 * </p>
 *
 * @author GrowthGate
 * @since 2019-05-11
 */
@TableName("t_data_class_intermediary")
public class ClassIntermediary extends Model<ClassIntermediary> {

	private static final long serialVersionUID = 1L;

	/**
	 * 主键id
	 */
	@TableId(value = "id", type = IdType.AUTO)
	private Long id;

	/**
	 * 攻击方id
	 */
	@NotNull(message = "攻击方id不能为空")
	private Long attackerId;

	/**
	 * 防守方id
	 */
	@NotNull(message = "防守方id不能为空")
	private Long defenderId;

	/**
	 * 伤害系数
	 */
	@TableField(strategy = FieldStrategy.IGNORED)
	private BigDecimal damage;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getAttackerId() {
		return attackerId;
	}

	public void setAttackerId(Long attackerId) {
		this.attackerId = attackerId;
	}

	public Long getDefenderId() {
		return defenderId;
	}

	public void setDefenderId(Long defenderId) {
		this.defenderId = defenderId;
	}

	public BigDecimal getDamage() {
		return damage;
	}

	public void setDamage(BigDecimal damage) {
		this.damage = damage;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "ClassIntermediary{" + "id=" + id + ", attackerId=" + attackerId + ", defenderId=" + defenderId
				+ ", damage=" + damage + "}";
	}

}
